"use strict";
cc._RF.push(module, '5ff4aqE6XBC4pFqPEx/YzdC', 'IndexRankItemUI');
// scripts/IndexRankItemUI.js

"use strict";

var t = require;
var e = module;
var o = exports;

var _n10,
    i = void 0 && (void 0).__extends || (_n10 = function n(t, e) {
  return (_n10 = Object.setPrototypeOf || {
    __proto__: []
  } instanceof Array && function (t, e) {
    t.__proto__ = e;
  } || function (t, e) {
    for (var o in e) {
      Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
    }
  })(t, e);
}, function (t, e) {
  function o() {
    this.constructor = t;
  }

  _n10(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o());
}),
    s = void 0 && (void 0).__decorate || function (t, e, o, n) {
  var i,
      s = arguments.length,
      r = s < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n;
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : typeof Reflect) && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n);else for (var c = t.length - 1; c >= 0; c--) {
    (i = t[c]) && (r = (s < 3 ? i(r) : s > 3 ? i(e, o, r) : i(e, o)) || r);
  }
  return s > 3 && r && Object.defineProperty(e, o, r), r;
};

Object.defineProperty(o, "__esModule", {
  value: !0
});

var r = cc._decorator,
    c = r.ccclass,
    a = r.property,
    u = function (t) {
  function e() {
    var e = null !== t && t.apply(this, arguments) || this;
    return e.rankLabel = null, e.areaLabel = null, e.countLabel = null, e.zyCountLabel = null, e.ssCountLabel = null, e.zyNode = null, e.shaokaosNode = null, e.lineNode = null, e.itemNode = null, e.usersContent = null, e.indexUI = null, e.isLoadUser = !1, e.users = null, e.zys = null, e.region = "", e.count = 0, e.zyCount = 0, e.ssCount = 0, e.rank = 0, e;
  }

  return i(e, t), e.prototype.onLoad = function () {
    var t = this;
    this.node.on(cc.Node.EventType.TOUCH_END, function () {
      var e = {
        type: 1
      };
      e.users = t.users, e.region = t.region, e.count = t.count, t.indexUI.showRankUsersUI(e);
    }, this), this.zyNode.on(cc.Node.EventType.TOUCH_END, function (e) {
      var o = {
        type: 2
      };
      o.users = t.zys, o.region = t.region, o.count = t.zyCount, t.indexUI.showRankUsersUI(o), e.stopPropagation();
    }, this);
  }, e.prototype.init = function (t, e, o, n, i, s, r, c) {
    this.indexUI = t, this.rank = e, this.users = r, this.zys = c, this.count = o, this.zyCount = n, this.ssCount = i, this.region = s;
    var a = this.indexUI.game.getLanguage("label_rank");
    a = a.replace("#{rank}", e), this.rankLabel.string = a, this.areaLabel.string = s + this.indexUI.game.getLanguage("label_shaokaodui"), this.countLabel.string = o + this.indexUI.game.getLanguage("label_region_count"), this.zyCountLabel.string = n + this.indexUI.game.getLanguage("label_region_zy_count"), this.ssCountLabel.string = i + this.indexUI.game.getLanguage("label_region_ss_count"), this.isLoadUser || (this.isLoadUser = !0), this.lineNode.width = o < 10 ? 110 : o >= 10 && o < 100 ? 130 : o >= 100 && o < 1e3 ? 150 : 170;
  }, e.prototype.start = function () {}, s([a(cc.Label)], e.prototype, "rankLabel", void 0), s([a(cc.Label)], e.prototype, "areaLabel", void 0), s([a(cc.Label)], e.prototype, "countLabel", void 0), s([a(cc.Label)], e.prototype, "zyCountLabel", void 0), s([a(cc.Label)], e.prototype, "ssCountLabel", void 0), s([a(cc.Node)], e.prototype, "zyNode", void 0), s([a(cc.Node)], e.prototype, "shaokaosNode", void 0), s([a(cc.Node)], e.prototype, "lineNode", void 0), s([a(cc.Node)], e.prototype, "itemNode", void 0), s([a(cc.Node)], e.prototype, "usersContent", void 0), s([c], e);
}(cc.Component);

o["default"] = u;

cc._RF.pop();